DEMO #2: In this activity, we'll see how we can use the variable we created in our program.

In .Display(), we use the variable name dice_roll to show its value, 5.

  • Hover over the display toward the bottom of the stage to see what it does and what it is called.
  • In the editor, change the value of dice_roll to a new number between 1 and 6. Click Run to see the change.
  • Click Ticket and answer the questions.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)